﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LoginIn.DesignerCS
{
    public partial class UserControl1 : UserControl
    {
        private void Selfun(string ID)
        {
            oleDbDataAdapter1.Fill(dataSet61);
            DataTable temp = new DataTable();
            temp = dataSet61.Tables[0];
            DataRow[] temp1 = temp.Select("Stu_ID ='" +ID+ "'");
            t1.Text = (string)temp1[0]["Stu_name"];
            t2.Text = ID;
            t3.Text = (string)temp1[0]["Stu_Age"];
            t4.Text = (string)temp1[0]["Stu_Dept"];
            t5.Text = "2018级"; 
            // 恢复oleDbAdapter1的查询命令
           // oleDbDataAdapter1.SelectCommand.CommandText = oldSelectStmt;
        }


        public UserControl1(string Form1_ID)
        {
            InitializeComponent();
            Selfun(Form1_ID);
          
        }




        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void name_Click(object sender, EventArgs e)
        {

        }
    }
}
